package com.jie.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.sql.Date;
import java.time.LocalDateTime;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
@TableName("clock_plan")
public class ClockPlan implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id",type = IdType.AUTO)
    private  Integer id;                  //id

    private  Integer userId;             //用户id

    private  Integer sportId;             //运动id

    private  String planName;             //计划名称

    private  Integer consumption;         //消耗能量，优先用户自定义，若用户没有自定义再根据运动素材种的消耗定义，若也没有则可以为空

    private  Integer exerciseDuration;    //运动时长,以分钟为单位，根据开始时间和结束时间计算，用户只需设置开始时间和结束时间


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
    private  LocalDateTime startTime;           //开始时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
    private  LocalDateTime endTime;           //结束时间


    private  Integer isFinish;            //是否完成


    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
    private LocalDateTime date;           //计划日期

}
